 <!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />

        <!-- Base Css Files -->
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/fontello/css/fontello.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/animate-css/animate.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/css/component.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/magnific-popup/magnific-popup.css" rel="stylesheet" /> 
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style-responsive.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro.css" rel="stylesheet" type="text/css" />
        
        <!-- Custom Css Files -->
        <link href="__ADMIN_CSS__/style.css"  rel="stylesheet" />
    </head>
    <body>
	<!-- Begin page -->
	<div>
		<div class="sub-header-title">
			<h2>奖金一键结算</h2>
		</div>
		<div class="important-tips-info">
			<h2 class="red"><i class="icon-info-circled-alt"></i>谨慎操作，请认真阅读以下说明：</h2>
			<p <if condition="$system_state eq  1">class="red"</if>><b>1.此操作必须在系统在关闭状态下，以免引起数据异常。请事先关闭系统，否则不允许进行操作！</b></p>
			<p><b>2.一键结算是对会员未结算业绩的快捷操作。</b></p>
			<p><b>3.按照业绩产生的时间进行依次结算。</b></p>
			<p><b>4.奖金结算时按照当前设定的奖项规则进行。</b></p>
			<p><b>5.结算后如需查看奖金，请在财务明细——>奖金明细中核对。</b></p>
			<p><b>6.结算后如需查看收支比，请在统计报表——>收支比图表中核对。</b></p>
			<br/>
			<br/>
			<div class="form-group">
				<label class="col-sm-2"></label>
				<div class="col-sm-10">
					<button type="button" id="submit-sum" class="btn btn-success">一键结算</button>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
	</div>
	<!-- End of page -->
	
	<!-- Base Js Files -->
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery/jquery-1.11.1.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/jquery-ui-1.10.4.custom.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-ui-touch/jquery.ui.touch-punch.min.js"></script>
 	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-detectmobile/detect.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/fastclick/fastclick.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-slimscroll/jquery.slimscroll.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/js/classie.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/js/modalEffects.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/notify.min.js"></script>
    <script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro-blue.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.min.js"></script>
	
	
	<!-- Custom Js Files -->
	<script src="__ADMIN_JS__/common.js"></script>
	
	<script>
	$(function(){
		// 结算
		$('#submit-sum').click(function(event) {
			window.parent.layer.confirm('请事先明了操作注意事项！确认要结算吗？', {
				btn: ['确认','取消'], //按钮
			}, function(index){
				//开启数据处理提示
				var load = window.parent.layer.msg('奖金结算中。。。', {
							  icon: 16,
							  shade: 0.5,
							  time: 0,
							});

				// 用ajax提交表单
				$.post("{:U('Data/reward')}", function(response) {
					//关闭数据处理提示
					window.parent.layer.close(load);
					//弹出提示
					window.parent.layer.msg(response.message);

					//根据请求相应状态提示通知
					if(response.status){
						notify("success",response.message);
					}else{
						notify("error",response.message);
					}
				}, 'json');

				//关闭确认对话框
				window.parent.layer.close(index);
			});
		});
	});
	</script>
	</body>
</html>